package com.zh.mediaservice.mapper;

import com.zh.mediapojo.dto.DoctorLoginDTO;
import com.zh.mediapojo.entity.DoctorLogin;
import org.apache.ibatis.annotations.*;

@Mapper
public interface DoctorLoginMapper {

    @Select("select * from doctor_log where " +
            "account = #{account}")
    DoctorLogin login(DoctorLoginDTO doctorLoginDTO);

    @Insert("INSERT INTO doctor_log(did,account) values (#{did},#{account})")
    void init(@Param("account") Long account, @Param("did") Integer did);

    @Update("update doctor_log set password=#{s},isFirst=false where did=#{id}")
    void updatePassword(Integer id, String s);
}
